import config from "@/config"
import http from "@/utils/request"

export default {
	//收支账户
	account:{
		list: {
			url: `${config.API_URL}/adminapi/finance.SettlementAccount/lists`,
			name: "获取账户列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/finance.SettlementAccount/all`,
			name: "获取账户列表 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/finance.SettlementAccount/add`,
			name: "添加账户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/finance.SettlementAccount/edit`,
			name: "修改账户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/finance.SettlementAccount/delete`,
			name: "删除账户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    //收支类型
	szcate:{
		list: {
			url: `${config.API_URL}/adminapi/finance.CollectPayType/lists`,
			name: "获取类型列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/finance.CollectPayType/all`,
			name: "获取类型列表 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/finance.CollectPayType/add`,
			name: "添加类型",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/finance.CollectPayType/edit`,
			name: "修改类型",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/finance.CollectPayType/delete`,
			name: "删除类型",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    //应收账款
	receivable:{
		list: {
			url: `${config.API_URL}/adminapi/finance.CollectAccounts/lists`,
			name: "获取应收账款列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/finance.CollectAccounts/customerOrder`,
			name: "应收账款详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
    //应付账款
	payable:{
		list: {
			url: `${config.API_URL}/adminapi/finance.PayAccounts/lists`,
			name: "获取应付账款列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/finance.PayAccounts/supplierOrder`,
			name: "应付账款详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
    //收-支
	sz:{
		list: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/lists`,
			name: "获取收-支列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/add`,
			name: "添加收-支",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/edit`,
			name: "修改收-支",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/delete`,
			name: "删除收-支",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/detail`,
			name: "收-支详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        check: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/checkStatus`,
			name: "审核收-支",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        uncheck: {
			url: `${config.API_URL}/adminapi/finance.OtherCollectPay/uncheckStatus`,
			name: "反审核收-支",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    //收款单
	shouorder:{
		list: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/lists`,
			name: "获取收款单列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/add`,
			name: "添加收款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/edit`,
			name: "修改收款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/delete`,
			name: "删除收款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/detail`,
			name: "收款单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        check: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/checkStatus`,
			name: "审核收款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		uncheck: {
			url: `${config.API_URL}/adminapi/finance.CollectReceipt/uncheckStatus`,
			name: "反审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    //付款单
	fuorder:{
		list: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/lists`,
			name: "获取付款单列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/add`,
			name: "添加付款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/edit`,
			name: "修改付款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/delete`,
			name: "删除付款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/detail`,
			name: "付款单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        check: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/checkStatus`,
			name: "审核付款单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		uncheck: {
			url: `${config.API_URL}/adminapi/finance.PayOrder/uncheckStatus`,
			name: "反审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 资金流水
    recordlist: {
        url: `${config.API_URL}/adminapi/finance.CollectPay/lists`,
        name: "收支流水",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    //开票
	invoice:{
        // 合同
        contract:{
            list: {
                url: `${config.API_URL}/adminapi/finance.ContractInvoice/lists`,
                name: "获取合同开票列表",
                get: async function(data={}){
                    return await http.get(this.url, data);
                }
            },
            add: {
                url: `${config.API_URL}/adminapi/finance.ContractInvoice/edit`,
                name: "合同开票",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
        },
        // 采购
        purchase:{
            list: {
                url: `${config.API_URL}/adminapi/finance.PurchaseInvoice/lists`,
                name: "获取采购开票列表",
                get: async function(data={}){
                    return await http.get(this.url, data);
                }
            },
            add: {
                url: `${config.API_URL}/adminapi/finance.PurchaseInvoice/edit`,
                name: "采购开票",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
        },
	},
}
